package org.hwua.production.domain;

import javax.validation.constraints.Max;
import javax.validation.constraints.Size;
/**
 * 工序
 * @author hwua
 *
 */
public class Process implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	
	@Size(max=40, message="{id.length.error}")
    private String processId;//工序编号
	
    private String technologyPlanId;//工艺计划编号

	@Max(value=999999999, message="工序顺序不能超过999999999")
    private Integer sequence;//工序顺序

	@Max(value=999999999, message="单件定额工时不能超过999999999")
    private Integer quota;//单件定额工时

    public String getProcessId() {
        return processId;
    }

    public void setProcessId(String processId) {
        this.processId = processId == null ? null : processId.trim();
    }

    public String getTechnologyPlanId() {
        return technologyPlanId;
    }

    public void setTechnologyPlanId(String technologyPlanId) {
        this.technologyPlanId = technologyPlanId == null ? null : technologyPlanId.trim();
    }

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public Integer getQuota() {
        return quota;
    }

    public void setQuota(Integer quota) {
        this.quota = quota;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((processId == null) ? 0 : processId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Process other = (Process) obj;
		if (processId == null) {
			if (other.processId != null)
				return false;
		} else if (!processId.equals(other.processId))
			return false;
		return true;
	}
    
    
}